home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aay.d64
/
memowriter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
73 lines
9 GOSUB500
10 POKE204,0:GOSUB800:POKE650,128:SP=1
20 GETA$:IFA$=""THEN20
22 IFA$=CHR$(34)THEN20
25 IFA$="[147]"THENGOSUB800:A$="":GOTO20
30 IFASC(A$)<141ANDASC(A$)>132THENGOSUB100
32 IFA$=""THEN20
35 IFASC(A$)=13AND(PEEK(210)=7)AND(PEEK(209)>151)THEN20
40 POKE205,3:WAIT207,1:PRINTA$;
50 IFPEEK(210)=7AND(PEEK(209)+PEEK(211)>191)THENPOKE205,3:WAIT207,1:PRINT"[145]";
60 GOTO20
100 X=0
110 IFA$="[133]"THENX=5
120 IFA$="[134]"THENX=10
130 IFA$="[135]"THENX=15
140 IFA$="[136]"THENX=20
150 IFA$="[137]"THENX=25
160 IFX>0THENA$="":FORQ=1TOX:A$=A$+"":NEXTQ:RETURN
170 IFA$="[138]"THENIFSP=1THENSP=2:POKE1984,178:POKE56256,1:RETURN
175 IFA$="[138]"THENSP=1:POKE1984,177:POKE56256,1:RETURN
180 IFA$="[139]"THENG1=984:TF=14:RW=23:CL=40:REM EXPANDED
190 IFA$="[140]"THENG1=944:TF=15:RW=11:CL=80:REM NORMAL
200 A$=""
210 GOSUB60000
220 RETURN
500 POKE53281,0:POKE53280,2
510 PRINT"[147]MEMO WRITER"
530 PRINT"THIS IS A SCREEN-ORIENTED"
540 PRINT"WORD PROCESSING PROGRAM"
550 PRINT"USING THE COMMODORE-64'S"
560 PRINT"OWN BUILT-IN EDITING"
570 PRINT"CAPABILITIES."
590 PRINT"HIT ANY KEY FOR LIST OF CONTROL KEYS"
600 POKE198,0
610 GETA$:IFA$=""THEN610
620 PRINT"[147]F1 F3 F5 F7 F2 TAB FROM CURRENT"
630 PRINT"POSITION IN INCRE-"
640 PRINT"MENTS OF FIVE."
645 PRINT"F4 SET SINGLE OR DOUBLE SPACE"
650 PRINT"F6 PRINT EXPANDED"
660 PRINT"CHARACTERS"
670 PRINT"F8 PRINT IN NORMAL SIZE"
680 PRINT"CHARACTERS."
690 PRINT"ALL EDITING KEYS WORK AS NORMAL."
700 PRINT"TEXT CANNOT SCROLL PAST END OF SCREEN."
710 PRINT"YOU MAY TYPE IN UPPERCASE/GRAPHICS OR "
720 PRINT"UPPERCASE/LOWERCASE MODE; THE PRINT"
730 PRINT"ROUTINE WILL AUTOMATICALLY"
740 PRINT"SET THE PRINT MODE CORRECTLY."
750 PRINT"HIT ANY KEY TO BEGIN"
760 POKE198,0
770 GETA$:IFA$=""THEN770
780 RETURN
800 POKE53281,1:PRINT"[147]>";:POKE53281,0:FORX=1TO11:PRINT"[157]>";:NEXTX
810 PRINT"[157][183][183][183][183][183][183][183][183][183][183][183][183][183]MEMO WRITER[146][183][183][183][183][183][183][183][183][183][183][183][183][183][183]";
820 RETURN
60000 Q=PEEK(53272):IFQ=21THENG1$=CHR$(145):GOTO60010
60005 G1$=CHR$(17)
60010 G1$=G1$+CHR$(TF)
60020 OPEN4,4:WAIT207,1:POKE204,255
60030 FORG0=0TORW:G0$=G1$:G1=G1+CL
60040 FORG2=G1TOG1+(CL-1):G3=PEEK(G2)
60050 IFG3>128THENG3=G3-128:G4=1:G0$=G0$+CHR$(18)
60060 IF(G3>0)*(G3<32)THENG3=G3+64:GOTO60100
60070 IF(G3>31)*(G3<64)THEN60100
60080 IF(G3>63)*(G3<96)THENG3=G3+128:GOTO60100
60090 IF(G3>95)*(G3<128)THENG3=G3+64:GOTO60100
60100 G0$=G0$+CHR$(G3)
60110 IFG4=1THENG0$=G0$+CHR$(146):G4=0
60120 NEXTG2:PRINT#4,G0$:IFSP=2THENPRINT#4
60130 NEXTG0:CLOSE4:POKE204,0
60140 RETURN